/*************************************************
filename	: audio_module.h
author		: Stefan lulham
desc		: Contains the base audio module.
			  This module lets you load and play sounds,
			  which may use only one channel each (once a sound
			  is done playing it will release its channel).
*************************************************/
#ifndef D_AUDIO_MODULE_H
#define D_AUDIO_MODULE_H

#include <string>

#include <modules\module.h>
#include <modules\audio\audio_module.h>
#include <modules\audio\sound.h>
#include <modules\audio\music.h>

#include <modules\audio\fmod\fmod_audio_interface.h>

#undef PlaySound
#undef LoadSound
#undef UnloadSound

using namespace std;

namespace DelGE
{
	namespace Modules
	{
		namespace Audio
		{
			class AudioModule : public Module
			{
			private:
				FModAudioInterface* pFMod_AudioInterface;

			protected:
				void LoadModule();
				void UnloadModule();
				
			public:
				AudioModule();
				~AudioModule();

				FModAudioInterface* GetInterface_FMod();

				Sound* LoadSound(string sFilepath);
				Music* LoadMusic(string sFilepath);

				void UnloadSound(Sound* pAudioSound);
				void UnloadMusic(Music* pAudioMusic);

				void Update();
			};
		}
	}
}

#endif